package com.sunlands.qdcy.deskmate.dao.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * @author zl
 * @version 1.0
 * @date Created in 2020/4/10
 * 苹果支付信息表，保存凭证
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity(name = "payment_apple_fail_record")
@JsonSerialize
@DynamicUpdate
@DynamicInsert
public class PaymentAppleFailRecord implements Serializable {


    private static final long serialVersionUID = 1706199627769012150L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String outTradeNo;

    private Long userId;

    private String receiptData;

    private String receiptDataMd5;

    private Integer useSandbox;

    private Integer status;

    private String msg;

    private String productId;

    private String environment;

    private String transactionId;

    private String trialPeriod;

    private String quantity;

    private String receiptType;

    private String applicationVersion;

    private String originalApplicationVersion;

    private String receiptCreationDate;

    private String requestDate;

    private String body;

    /**
     * 是否已经处理：0-没有处理，1-已经处理
     */
    private Integer hasHandled;

    private String cancellationDate;

    private String cancellationReason;

    private String failMsg;

    @CreationTimestamp
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;



}
